# Vsftpd configuration
# Managed by Ansible, don't edit manually

#
# General settings
#

connect_from_port_20={{ 'YES' if vsftpd_connect_from_port_20 else 'NO' }}
listen={{ 'YES' if vsftpd_listen else 'NO' }}
listen_ipv6={{ 'YES' if vsftpd_listen_ipv6 else 'NO' }}
pam_service_name={{ vsftpd_service }}
syslog_enable={{ 'YES' if vsftpd_syslog_enable else 'NO' }}

#
# Access control for anonymous users
#
anonymous_enable={{ 'YES' if vsftpd_anonymous_enable else 'NO' }}
{% if vsftpd_anon_root is defined %}
anon_root={{ vsftpd_anon_root }}
{% endif %}

#
# Access control for registered users
#
local_enable={{ 'YES' if vsftpd_local_enable else 'NO' }}
{% if vsftpd_local_root is defined %}
local_root={{ vsftpd_local_root }}
{% endif %}
local_umask={{ vsftpd_local_umask }}

write_enable={{ 'YES' if vsftpd_write_enable else 'NO' }}
{% if not (ansible_os_family == 'RedHat' and ansible_distribution_major_version == '6') %}
seccomp_sandbox=NO
{% endif %}

{% if vsftpd_options is defined %}
#
# Other settings
#
{% for setting in vsftpd_options %}
{{ setting.key }}={{ setting.value }}
{% endfor %}
{% endif %}
